home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / BlindAlleys.dxr / Internal_10_f hotz.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.2 KB  |  55 lines

  1. property spriteNum, row
  2. global stock, foundation, equal, currentsel, getlist, godlist, basecard, leftlist, rightlist
  3.  
  4. on beginSprite me
  5.   if listp(foundation) = 0 then
  6.     foundation = [:]
  7.   end if
  8.   row = determinerow()
  9.   foundation.addProp(row, new(script("card pile")))
  10. end
  11.  
  12. on determinerow me
  13.   if spriteNum = 115 then
  14.     return #fone
  15.   else
  16.     if spriteNum = 116 then
  17.       return #ftwo
  18.     else
  19.       if spriteNum = 117 then
  20.         return #fthree
  21.       else
  22.         if spriteNum = 118 then
  23.           return #ffour
  24.         end if
  25.       end if
  26.     end if
  27.   end if
  28. end
  29.  
  30. on mouseEnter me
  31.   if getlist <> VOID then
  32.     if foundation[row].getcardcount() = 0 then
  33.       if getlist.getlastcard().rank = "ace" then
  34.         equal = 1
  35.         currentsel = spriteNum - 4
  36.         godlist = foundation[row]
  37.       end if
  38.     else
  39.       if foundation[row].getcardcount() > 0 then
  40.         if (getlist.getlastcard().rankvalue = (foundation[row].getlastcard().rankvalue + 1)) and (getlist.getlastcard().suit = foundation[row].getlastcard().suit) then
  41.           equal = 1
  42.           currentsel = spriteNum - 4
  43.           godlist = foundation[row]
  44.         end if
  45.       end if
  46.     end if
  47.   end if
  48. end
  49.  
  50. on mouseLeave me
  51.   equal = 0
  52.   currentsel = 0
  53.   godlist = VOID
  54. end
  55.